package com.zxl.controller;

import com.alibaba.fastjson.JSONObject;
import com.zxl.entity.TCheckDataTool;
import com.zxl.service.DcGovernanceToolService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

/**
* Created by CodeGenerator on 2021/07/28.
*/
@RestController
@RequestMapping("/dc/governance/tool")
public class DcGovernanceToolController {
    @Resource
    private DcGovernanceToolService dcGovernanceToolService;


    @GetMapping("/findCaptureParamByModuleAndConfigKey")

    public JSONObject findCaptureByModule(@RequestParam String module, @RequestParam String configKey) {
        return dcGovernanceToolService.findCaptureByModuleAndConfigKey(module, configKey);
    }

    @PutMapping("/updateCaptureParam")
    public void updateCaptureParamByModuleAndConfigKey(@RequestBody TCheckDataTool tCheckDataTool) {
        String module = tCheckDataTool.getModule();
        String configKey = tCheckDataTool.getConfigKey();
        dcGovernanceToolService.updateCaptureParam(tCheckDataTool, module, configKey);
    }
}
